package es.mgil.whoWantsToBeAMillonaire.util;

public class Question {

	private String number = null;
	private String text = null;
	private String answer1 = null;
	private String answer2 = null;
	private String answer3 = null;
	private String answer4 = null;
	private String right = null;
	private String audience = null;
	private String phone = null;
	private String fifty1 = null;
	private String fifty2 = null;

	public Question() {
	}

	public Question(String number, String text, String answer1, String answer2,
			String answer3, String answer4, String right, String audience,
			String phone, String fifty1, String fifty2) {
		this.number = number;
		this.text = text;
		this.answer1 = answer1;
		this.answer2 = answer2;
		this.answer3 = answer3;
		this.answer4 = answer4;
		this.right = right;
		this.audience = audience;
		this.phone = phone;
		this.fifty1 = fifty1;
		this.fifty2 = fifty2;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getAnswer1() {
		return answer1;
	}

	public void setAnswer1(String answer1) {
		this.answer1 = answer1;
	}

	public String getAnswer2() {
		return answer2;
	}

	public void setAnswer2(String answer2) {
		this.answer2 = answer2;
	}

	public String getAnswer3() {
		return answer3;
	}

	public void setAnswer3(String answer3) {
		this.answer3 = answer3;
	}

	public String getAnswer4() {
		return answer4;
	}

	public void setAnswer4(String answer4) {
		this.answer4 = answer4;
	}

	public String getRight() {
		return right;
	}

	public void setRight(String right) {
		this.right = right;
	}

	public String getAudience() {
		return audience;
	}

	public void setAudience(String audience) {
		this.audience = audience;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getFifty1() {
		return fifty1;
	}

	public void setFifty1(String fifty1) {
		this.fifty1 = fifty1;
	}

	public String getFifty2() {
		return fifty2;
	}

	public void setFifty2(String fifty2) {
		this.fifty2 = fifty2;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	/**
	 * Returns the value given number answer
	 */
	public String getAnswerFromNumber(String number) {
		if (number == null) {
			return "";
		}

		if (number.equals("1")) {
			return answer1;
		} else if (number.equals("2")) {
			return answer2;
		} else if (number.equals("3")) {
			return answer3;
		} else if (number.equals("4")) {
			return answer4;
		} else {
			return "";
		}
	}

}
